* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: 'PingFang SC', 'Microsoft YaHei', sans-serif;
    transition:
            background-color 0.3s,
            transform 0.3s,
            box-shadow 0.3s,
            border-color 0.3s,
            opacity 0.3s;
}

body {
    background: linear-gradient(135deg, #1a1b1f 0%, #0f1013 100%);
    color: #ffffff;
    height: 100vh;
    display: flex;
    overflow: hidden;
}

/* 左侧导航栏 - 更精致的折叠式设计 */
.sidebar {
    width: 72px;
    height: 100%;
    background: linear-gradient(180deg, #1e1f22 0%, #17181b 100%);
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 12px 0;
    transition: width 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    overflow: hidden;
    border-right: 1px solid #2a2c31;
    z-index: 100;
}

.sidebar:hover {
    width: 240px;
    align-items: flex-start;
    padding: 12px;
}

.sidebar-header {
    width: 100%;
    display: flex;
    justify-content: center;
    margin-bottom: 16px;
    position: relative;
}

.sidebar:hover .sidebar-header {
    justify-content: flex-start;
}

.logo {
    font-size: 20px;
    font-weight: 800;
    color: #ffffff;
    text-decoration: none;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 48px;
    height: 48px;
    border-radius: 16px;
    background: linear-gradient(135deg, #7289da 0%, #5b6eae 100%);
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    box-shadow: 0 4px 10px rgba(114, 137, 218, 0.3);
}

.sidebar:hover .logo {
    width: 100%;
    padding: 0 16px;
    border-radius: 8px;
}

.nav-buttons {
    width: 100%;
    display: flex;
    flex-direction: column;
    gap: 8px;
    margin-bottom: 16px;
}

.nav-button {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 48px;
    height: 48px;
    color: #b5bac1;
    text-decoration: none;
    font-size: 20px;
    border-radius: 16px;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    margin: 0 auto;
    position: relative;
    background: rgba(40, 42, 46, 0.5);
}

.sidebar:hover .nav-button {
    width: 100%;
    border-radius: 8px;
    justify-content: flex-start;
    padding-left: 16px;
}

.nav-button span {
    display: none;
    margin-left: 12px;
    font-size: 16px;
}

.sidebar:hover .nav-button span {
    display: inline;
}

.nav-button:hover {
    background: rgba(114, 137, 218, 0.2);
    color: #ffffff;
    transform: translateY(-2px);
}

.nav-button.active {
    background: rgba(114, 137, 218, 0.3);
    color: white;
}

/* 频道列表样式 */
.channels-container {
    flex: 1;
    overflow-y: auto;
    width: 100%;
    display: flex;
    flex-direction: column;
    gap: 4px;
    scrollbar-width: thin;
    scrollbar-color: #7289da transparent;
}

.channels-container::-webkit-scrollbar {
    width: 6px;
}

.channels-container::-webkit-scrollbar-thumb {
    background-color: #7289da;
    border-radius: 3px;
}

.channel {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 48px;
    height: 48px;
    color: #dbdee1;
    text-decoration: none;
    font-size: 16px;
    border-radius: 16px;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    margin: 0 auto;
    overflow: hidden;
    white-space: nowrap;
    position: relative;
    background: rgba(40, 42, 46, 0.5);
}

.sidebar:hover .channel {
    width: 100%;
    border-radius: 8px;
    justify-content: flex-start;
    padding-left: 16px;
}

.channel span {
    display: none;
    margin-left: 12px;
}

.sidebar:hover .channel span {
    display: inline;
}

.channel:hover {
    background: rgba(114, 137, 218, 0.2);
    color: #ffffff;
}

.channel.active {
    background: rgba(114, 137, 218, 0.3);
    color: white;
}

.add-channel {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 48px;
    height: 48px;
    color: #dbdee1;
    text-decoration: none;
    font-size: 24px;
    border-radius: 16px;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    margin: 0 auto;
    background: rgba(40, 42, 46, 0.5);
}

.sidebar:hover .add-channel {
    width: 100%;
    border-radius: 8px;
    justify-content: flex-start;
    padding-left: 16px;
}

.add-channel:hover {
    background: rgba(114, 137, 218, 0.2);
    color: #ffffff;
}

/* 用户资料卡 */
.user-profile {
    width: 48px;
    height: 48px;
    border-radius: 50%;
    overflow: hidden;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    margin-top: auto;
    display: flex;
    justify-content: center;
    align-items: center;
    background-color: #2b2d31;
    border: 2px solid #7289da;
}

.sidebar:hover .user-profile {
    width: 100%;
    height: auto;
    min-height: 48px;
    border-radius: 8px;
    padding: 8px;
    display: flex;
    align-items: center;
    border: none;
    background: rgba(40, 42, 46, 0.5);
}

#user_a {
    display: flex;
    align-items: center;
    text-decoration: none;
    width: 100%;
    gap: 8px;
}

#user_img {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    object-fit: cover;
    transition: all 0.3s;
    border: 2px solid #7289da;
}

.sidebar:hover #user_img {
    width: 32px;
    height: 32px;
    margin-right: 0;
}

.username {
    font-size: 14px;
    color: #ffffff;
    font-weight: 500;
    display: none;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.sidebar:hover .username {
    display: block;
}

/* 主内容区 */
.main-content {
    flex: 1;
    display: flex;
    flex-direction: column;
    height: 100%;
    background: linear-gradient(135deg, #313338 0%, #2b2d31 100%);
}

/* 顶部导航栏 - 更精致的样式 */
.top-nav {
    height: 56px;
    background: linear-gradient(90deg, #1e1f22 0%, #2b2d31 100%);
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0 24px;
    border-bottom: 1px solid #40444b;
    position: relative;
    z-index: 10;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.3);
}

.nav-buttons-right {
    display: flex;
    align-items: center;
    gap: 16px;
}

.nav-button-right {
    color: #b5bac1;
    text-decoration: none;
    font-size: 16px;
    cursor: pointer;
    transition: all 0.2s ease;
    display: flex;
    align-items: center;
    height: 36px;
    padding: 0 12px;
    border-radius: 4px;
    position: relative;
    gap: 8px;
    background: rgba(40, 42, 46, 0.5);
}

.nav-button-right:hover {
    color: #ffffff;
    background: rgba(114, 137, 218, 0.2);
    transform: translateY(-2px);
}

.nav-button-right.active {
    color: #7289da;
}

/* 下拉菜单 - 更精致的样式 */
.dropdown {
    position: absolute;
    top: 56px;
    right: 0;
    background: linear-gradient(135deg, #2b2d31 0%, #1e1f22 100%);
    border-radius: 8px;
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.4);
    width: 320px;
    max-height: 70vh;
    overflow-y: auto;
    z-index: 100;
    display: none;
    border: 1px solid #40444b;
    transform-origin: top right;
    animation: dropdownFadeIn 0.2s ease-out;
}

@keyframes dropdownFadeIn {
    from {
        opacity: 0;
        transform: translateY(-8px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.dropdown-header {
    padding: 16px;
    font-size: 16px;
    font-weight: 700;
    color: #f2f3f5;
    border-bottom: 1px solid #40444b;
    position: sticky;
    top: 0;
    background: rgba(43, 45, 49, 0.9);
}

.dropdown-item {
    display: flex;
    align-items: center;
    padding: 12px 16px;
    color: #dbdee1;
    text-decoration: none;
    font-size: 14px;
    transition: all 0.2s ease;
    gap: 12px;
}

.dropdown-item:hover {
    background: rgba(114, 137, 218, 0.1);
    color: #ffffff;
}

.dropdown-item i {
    font-size: 18px;
    color: #7289da;
}

.dropdown-divider {
    height: 1px;
    background: linear-gradient(90deg, transparent 0%, #40444b 50%, transparent 100%);
    margin: 8px 0;
}

.dropdown-empty {
    padding: 32px 16px;
    text-align: center;
    color: #949ba4;
    font-size: 14px;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
}

.dropdown-empty i {
    font-size: 24px;
    color: #7289da;
}

/* 内容区域 */
.content-area {
    flex: 1;
    padding: 24px;
    overflow-y: auto;
    background: transparent;
    scrollbar-width: thin;
    scrollbar-color: #7289da #2b2d31;
}

.content-area::-webkit-scrollbar {
    width: 8px;
}

.content-area::-webkit-scrollbar-thumb {
    background: #7289da;
    border-radius: 4px;
}

.content-area::-webkit-scrollbar-track {
    background: #2b2d31;
}

.content-container {
    display: flex;
    flex-direction: column;
    height: 100%;
    background: transparent;
    border-radius: 0;
    box-shadow: none;
    padding: 0;
    height: auto;
    min-height: calc(100vh - 48px);
}

.welcome-container {
    text-align: center;
    padding: 40px 20px;
    max-width: 1000px;
    margin: 0 auto;
}

.welcome-container h1 {
    font-size: 36px;
    margin-bottom: 20px;
    color: #ffffff;
    text-shadow: 0 2px 4px rgba(0,0,0,0.3);
}

.welcome-container p {
    font-size: 18px;
    color: #b5bac1;
    margin-bottom: 40px;
}

.features {
    display: flex;
    justify-content: center;
    gap: 30px;
    flex-wrap: wrap;
}

.feature-card {
    background: linear-gradient(135deg, #2b2d31 0%, #1e1f22 100%);
    border-radius: 12px;
    padding: 30px;
    width: 280px;
    text-align: center;
    border: 1px solid #40444b;
    transition: all 0.3s;
    box-shadow: 0 5px 15px rgba(0,0,0,0.2);
}

.feature-card:hover {
    transform: translateY(-10px);
    box-shadow: 0 10px 25px rgba(0,0,0,0.3);
    border-color: #7289da;
}

.feature-card i {
    font-size: 48px;
    color: #7289da;
    margin-bottom: 20px;
}

.feature-card h3 {
    font-size: 22px;
    margin-bottom: 15px;
    color: #ffffff;
}

.feature-card p {
    font-size: 16px;
    color: #b5bac1;
    margin-bottom: 0;
}

/* 创建频道浮层 - 更精致的样式 */
.modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-color: rgba(0, 0, 0, 0.7);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 1000;
    display: none;
    backdrop-filter: blur(4px);
    animation: fadeIn 0.2s ease-out;
}

@keyframes fadeIn {
    from {
        opacity: 0;
    }
    to {
        opacity: 1;
    }
}

.modal-content {
    background: linear-gradient(135deg, #2b2d31 0%, #1e1f22 100%);
    border-radius: 12px;
    padding: 24px;
    width: 440px;
    max-width: 90%;
    border: 1px solid #40444b;
    box-shadow: 0 12px 24px rgba(0, 0, 0, 0.3);
    transform-origin: center;
    animation: modalScaleIn 0.2s cubic-bezier(0.4, 0, 0.2, 1);
}

@keyframes modalScaleIn {
    from {
        transform: scale(0.95);
        opacity: 0;
    }
    to {
        transform: scale(1);
        opacity: 1;
    }
}

.modal-header {
    margin-bottom: 20px;
}

.modal-title {
    font-size: 20px;
    font-weight: 700;
    color: #f2f3f5;
    display: flex;
    align-items: center;
    gap: 8px;
}

.modal-body {
    margin-bottom: 24px;
}

.form-group {
    margin-bottom: 20px;
}

.form-label {
    display: block;
    margin-bottom: 8px;
    font-size: 14px;
    color: #b5bac1;
    font-weight: 600;
}

.form-input {
    width: 100%;
    padding: 12px;
    background-color: #1e1f22;
    border: 1px solid #111214;
    border-radius: 6px;
    color: #dbdee1;
    font-size: 14px;
    transition: all 0.2s ease;
}

.form-input:focus {
    outline: none;
    border-color: #7289da;
    box-shadow: 0 0 0 2px rgba(114, 137, 218, 0.3);
}

.modal-footer {
    display: flex;
    justify-content: flex-end;
    gap: 12px;
}

.btn {
    padding: 10px 18px;
    border-radius: 6px;
    cursor: pointer;
    font-size: 14px;
    border: none;
    font-weight: 600;
    transition: all 0.2s ease;
    min-width: 80px;
    text-align: center;
    display: flex;
    align-items: center;
    gap: 8px;
}

.btn-secondary {
    background: linear-gradient(135deg, #4e5058 0%, #3a3c42 100%);
    color: #f2f3f5;
}

.btn-secondary:hover {
    background: linear-gradient(135deg, #5d6069 0%, #4a4c53 100%);
}

.btn-primary {
    background: linear-gradient(135deg, #7289da 0%, #5b6eae 100%);
    color: #ffffff;
}

.btn-primary:hover {
    background: linear-gradient(135deg, #677bc4 0%, #4f5f9e 100%);
}

/* 通知样式 */
.notification {
    position: fixed;
    bottom: 20px;
    right: 20px;
    background: linear-gradient(135deg, #2b2d31 0%, #1e1f22 100%);
    color: #fff;
    padding: 15px 25px;
    border-radius: 8px;
    box-shadow: 0 5px 15px rgba(0,0,0,0.3);
    display: flex;
    align-items: center;
    gap: 10px;
    z-index: 1000;
    opacity: 0;
    transform: translateY(20px);
    transition: all 0.3s ease;
    border: 1px solid #40444b;
}

.notification i {
    color: #7289da;
    font-size: 20px;
}

/* 响应式调整 */
@media (max-width: 768px) {
    .sidebar {
        width: 0;
        padding: 0;
        overflow: hidden;
    }

    .sidebar:hover {
        width: 240px;
        padding: 12px;
    }

    .features {
        flex-direction: column;
        align-items: center;
    }

    .feature-card {
        width: 100%;
        max-width: 350px;
    }
}

/* 封面上传样式 */
.cover-upload {
    display: flex;
    flex-direction: column;
    align-items: center;
}

.cover-pw {
    width: 281px;
    height: 140px;
    background: #1e1f22;
    border: 2px dashed #40444b;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    cursor: pointer;
    transition: all 0.3s;
    overflow: hidden;
    border-radius: 6px;
}

.cover-pw:hover {
    border-color: #7289da;
    background: rgba(114, 137, 218, 0.1);
}

.cover-pw i {
    font-size: 24px;
    color: #7289da;
    margin-bottom: 8px;
}

.cover-pw span {
    font-size: 14px;
    color: #b5bac1;
}

.cover-pw img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

/* 文本域样式 */
textarea.form-input {
    min-height: 80px;
    resize: vertical;
}

/* 错误通知样式 */
.notification.error {
    background: linear-gradient(135deg, #e74c3c 0%, #c0392b 100%);
}